﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DailyComics.Common.Model.ImageProvideStrategyFactories;
using DailyComics.Common.Model;
using DailyComics.Common.Model.ImageProviderFactory;
using DailyComics.Common.Model.CachingStrategies;
using DailyComics.Common.Utilities.ImageProviderDecorator;

namespace DailyComics.Common.Utilities.ImageProviderFactory
{
  public class ImageProviderFileCacheFactory
  {
    private IImageProviderStrategyFactory factory;

    public ImageProviderFileCacheFactory(IImageProviderStrategyFactory factory)
    {
      this.factory = factory;
    }


    public IImageProvider Create()
    {
      ImageProvider provider = new ImageProvider(factory);
      FileCacheStrategy startegy = new FileCacheStrategy("images/wulfmorgenthaler/DK");

      return new ImageProviderCacheDecorator(provider, startegy);
    }
  }
}
